package com.hdoit.ares.web.cust.modelconfig;
import com.hdoit.ares.web.cust.providers.ApproveStateProvider;
import com.hdoit.ares.web.cust.providers.AuthenticationResultStateProvider;
import com.tennetcn.component.attribute.DateTimeAttribute;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      wangxuexue
 * @email       
 * @createtime  2017年12月04日 10:36:17
 * @comment
 */
public class AutonymApproveConfig extends ModelMetadataAttributeConfiguration{
    public AutonymApproveConfig(){
        this.setProperty("customerId")
            .hasAttribute(new DisplayNameAttribute("客户编号"));

        this.setProperty("custRealName")
            .hasAttribute(new DisplayNameAttribute("客户真实姓名"));

        this.setProperty("custIDCard")
            .hasAttribute(new DisplayNameAttribute("身份证号"));

        this.setProperty("requestDate")
            .hasAttribute(new DisplayNameAttribute("请求时间"))
            .hasAttribute(new DateTimeAttribute());

        this.setProperty("idFrontOssId")
            .hasAttribute(new DisplayNameAttribute("身份证正面"));

        this.setProperty("idReverseOssId")
            .hasAttribute(new DisplayNameAttribute("身份证反面"));

        this.setProperty("autonymStatus")
            .hasAttribute(new DisplayNameAttribute("认证状态"))
            .hasAttribute(new DropDownListAttribute(new ApproveStateProvider()));

//认证结果
        this.setProperty("authenticationResult.authenticationId")
        	.hasAttribute(new DisplayNameAttribute("认证表id"));
        
        this.setProperty("authenticationResult.auditorId")
        	.hasAttribute(new DisplayNameAttribute("审核人id"));

        this.setProperty("authenticationResult.auditor")
	        .hasAttribute(new DisplayNameAttribute("审核人"));
	
	    this.setProperty("authenticationResult.auditTime")
	        .hasAttribute(new DisplayNameAttribute("审核时间"))
	        .hasAttribute(new DateTimeAttribute());
	
	    this.setProperty("authenticationResult.auditDescription")
	        .hasAttribute(new DisplayNameAttribute("审核描述"))
	        .hasAttribute(new RequiredAttribute("审核描述为必填项"));
	
	    this.setProperty("authenticationResult.result")
	        .hasAttribute(new DisplayNameAttribute("审核结果"))
	        .hasAttribute(new DropDownListAttribute(new AuthenticationResultStateProvider()))
	        .hasAttribute(new RequiredAttribute("审核结果为必填项"));
	    
	    this.setProperty("customer.userIdentity")
	    	.hasAttribute(new DisplayNameAttribute("用户标识"));

    }
}